<template>
	<div class="publicpageview">
		<div class="publicformview">
			<div class="headTop">
				<div class="xinxi">
					<el-button @click="selectButton(1)" :class="[type==1?'tabButton':'']" type="primary"
						size="mini">产权情况</el-button>
					<el-button @click="selectButton(2)" :class="[type==2?'tabButton':'']" type="primary"
						size="mini">建筑构造</el-button>
					<el-button @click="selectButton(3)" :class="[type==3?'tabButton':'']" type="primary"
						size="mini">房屋现状</el-button>
					<el-button @click="selectButton(4)" :class="[type==4?'tabButton':'']" type="primary"
						size="mini">产权证件</el-button>
					<el-button @click="selectButton(5)" :class="[type==5?'tabButton':'']" type="primary"
						size="mini">产权变动</el-button>
					<el-button @click="selectButton(6)" :class="[type==6?'tabButton':'']" type="primary"
						size="mini">维修记录</el-button>
					<el-button @click="selectButton(7)" :class="[type==7?'tabButton':'']" type="primary"
						size="mini">其他记录</el-button>
					<el-button @click="selectButton(8)" :class="[type==8?'tabButton':'']" type="primary"
						size="mini">图形资料</el-button>
				</div>
				<el-button type="primary" size="mini" @click="returns">返回</el-button>
			</div>
		</div>

		<canquanqingkuang v-if="type==1" :blockType='blockType' :blockid='blockid'></canquanqingkuang>
		<jianzugouzao v-if="type==2" :blockType='blockType' :blockid='blockid' :blockno='blockno'></jianzugouzao>
		<fangwuxianzhuang v-if="type==3" :blockType='blockType' :blockid='blockid'></fangwuxianzhuang>
		<chanquanzhengjian v-if="type==4" :blockType='blockType' :blockid='blockid' :blockno='blockno'></chanquanzhengjian>
		<chanquanbiandong v-if="type==5" :blockType='blockType' :blockid='blockid' :blockno='blockno'></chanquanbiandong>
		<weixiujilu v-if="type==6" :blockType='blockType' :blockid='blockid' :blockno='blockno'></weixiujilu>
		<qitajilu v-if="type==7" :blockType='blockType' :blockid='blockid' :blockno='blockno'></qitajilu>
		<tuxingziliao v-if="type==8" :blockType='blockType' :blockid='blockid' :blockno='blockno'></tuxingziliao>
		

	</div>
</template>

<script>
	import canquanqingkuang from './suoComponents/canquanqingkuang.vue'
	import jianzugouzao from './suoComponents/jianzugouzao.vue'
	import fangwuxianzhuang from './suoComponents/fangwuxianzhuang.vue'
	import chanquanzhengjian from './suoComponents/chanquanzhengjian.vue'
	import chanquanbiandong from './suoComponents/chanquanbiandong.vue'
	import weixiujilu from './suoComponents/weixiujilu.vue'
	import qitajilu from './suoComponents/qitajilu.vue'
	import tuxingziliao from './suoComponents/tuxingziliao.vue'
	export default {
		name: "AccommodationManagementSuoziliaoluru",
		components:{
			canquanqingkuang,
			jianzugouzao,
			fangwuxianzhuang,
			chanquanzhengjian,
			chanquanbiandong,
			weixiujilu,
			qitajilu,
			tuxingziliao
		},
		data() {
			return {
				listQuery: {
					page: 1,
					limit: 20,
					keyword: "",
					mobile: "",
					status: "1",
					time: ""
				},
				total: 0,
				options: [{
					key: "1"
				}],
				listLoading: false,
				dialogVisible: false,
				isChanquan: true,
				type: '',
				blockid:'',
				blockType:'',
				blockno:''
			};
		},

		computed: {
		},

		mounted() {
			if(this.$route.query){
				this.blockid = this.$route.query.blockid
				this.blockType = this.$route.query.type
				this.blockno = this.$route.query.blockno
			}
			this.type = 1
		},

		methods: {
			resetForm(val) {
				console.log("1");
				this.$refs[val].resetFields();
			},
			handleAddUser(type) {
				this.isChanquan = type == 1 ? true : false
			},
			returns() {
				this.$router.go(-1)
			},
			// 选择类型
			selectButton(type) {
				this.type = type
			}
		},
	};
</script>
<style scoped>
	.headTop {
		width: 100%;
		display: flex;
		justify-content: space-between;

		.xinxi {
			display: flex;
			width: 800px;
		}
	}

	.el-form-item {
		justify-content: start !important;
	}

	.el-select {
		width: 180px;
	}

	.el-input {
		width: 180px;
	}

	.el-date-picker {
		width: 180px;
	}

	.bottomTop {
		width: 100%;
		display: flex;
		justify-content: end;
	}

	.tabButton {
		background: #EFF2F7;
		color: #333333;
		border: none;
	}
</style>